<?php


class App_Models_Albums
{
    public function get_albums()
    {
        $db = Core_Db::instance();

        $result = $db->query("SELECT * FROM `albums`;");

        if ($result) {
            return $result;
        } else {
            return false;
        }
    }

    public function get_album($album_id)
    {
        $db = Core_Db::instance();

        $result = $db->query("SELECT * FROM `albums` WHERE `id`='". mysql_real_escape_string($album_id) . "';");

        if ($result) {
            return $result;
        } else {
            return false;
        }
    }
}

?>
